package com.bwhx.eruler.dao.casdilly;

import java.lang.reflect.InvocationTargetException;
import java.util.Date;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;

import com.bwhx.eruler.bean.Page;
import com.bwhx.eruler.bean.casdilly.CasdillyCustomer;
import com.bwhx.eruler.bean.casdilly.CasdillyScanData;
import com.bwhx.eruler.bean.casdilly.Linkman;
import com.bwhx.eruler.dao.BaseDao;

public interface CasdillyCustomerDAO extends BaseDao<CasdillyCustomer> {


	List<CasdillyCustomer> findByFenchangIDAndCreatorID(String lMIDFenChang, String loginID);

	List<CasdillyCustomer> findUserDataByFenchangIDAndCreatorID(String lMIDFenChang, String loginID);

	
	String addCustomer(CasdillyCustomer customer);

	int updateCustomerPic(HashMap<String, String> dataMap);

	CasdillyCustomer findByID(String customerID);

	void updateCustomer(CasdillyCustomer customer);

	CasdillyCustomer get(String customerID);

	Boolean insertBatch(LinkedList<CasdillyCustomer> customerList);

	List<Map<String, String>> listByHetongSerial(Page p) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException;

	Integer countByHetongSerial(CasdillyCustomer customer);

	List<Map<String, String>> listByHetongSerial(CasdillyCustomer customer);

	CasdillyCustomer findByFenchangIDAndUserNameAndPhone(CasdillyCustomer casdillyCustomer);

	List<CasdillyCustomer> listByPhone(CasdillyCustomer ct);

	CasdillyCustomer getCustomerAndScanData(String customerID);

	CasdillyCustomer findByFenchangIDAndUserName(CasdillyCustomer casdillyCustomer);

	List<Map<String, String>> listByIDs(String ids) throws Exception;


	void updateCustomerExportStatus(List<Map<String, String>> list, Integer integer, Date date);

	List<CasdillyScanData> listScandataByCustomerID(String customerID);
	/**
	 * 
	 * @param p
	 * @return
	 */
	List<CasdillyScanData> listScandataByID(Page p);


	Integer countScandataByID(String customerID);

	void updateScandata(CasdillyScanData csd);

	void updateQrCodeInfo(CasdillyCustomer casdillyCustomer);

	CasdillyCustomer findCustomerNameById(String customerID);

	void updateCustomerOpenID(CasdillyCustomer customer);

	List<CasdillyCustomer> listBywxOpenid(String wxOpenid);

	List<CasdillyCustomer> listByLinkmanList(List<Linkman> linkManList);

	@Deprecated 
	/**
	 * 因为没有更新删除操作人信息，所以弃用。由updateDelInfoByCcustomerList(HashMap<String, Object> paramMap);取代
	 * @param ccustomerList
	 */
	void updateDelFlagByCcustomerList(List<CasdillyCustomer> ccustomerList);

	void updateScanDataDelFlagByCcustomerList(List<CasdillyCustomer> ccustomerList);

	List<CasdillyCustomer> hodoListByHetongSerial(CasdillyCustomer customer);

	List<CasdillyCustomer> hodoListByIDs(String ids);

	void updateDelInfoByCcustomerList(HashMap<String, Object> paramMap);

 
}
